Lighting

This chapter covers:

You may also find the following information helpful:

To be able to render lighting, the lighting engine must be enabled in the application settings.

Definition

Illumination in Patchwork 3D Design is provided by light sources. These light sources can be any of various types: sky, spot, omni, sun or area. Light sources of all types are grouped into lighting layers, which can be combined to create complex illumination set-ups. The set of visible layers and their coverage provides a total illumination set-up which is used to calculate lightmaps.

Lighting is managed in the Lighting tab of the Shaper sidebar. At each level — light sources, lighting layers, and full illumination set-up — settings are available to adjust the lighting properties.

Type of illumination rendering

The render configuration settings apply to the entire illumination set-up. They take into account all of the lights and layers, and their properties, including visibility and activation.

In the Rendering zone, you can set the type of lighting:

Type of lighting Description
Environment The Environment mode is the type of lighting established by default. In this mode, none of the existing light sources are taken into account. Sufficient light is assumed to be generated by the model's environment. The model is not affected by the illumination configuration.
Lightmap The Lightmap mode allows you to apply calculated lighting on the model.
Preview The Preview mode provides an interactive rendering of the shadow regions. This allows you to evaluate the placement and orientation of the light sources relative to the objects and camera viewpoint. Only the active lighting layer is visible in Preview mode.

The type of rendering that is chosen will also be applied in Matter, except in the case of Preview mode, which will be replaced with Environment.

Type-specific settings are available below the Type of lighting list for the chosen lighting type.

Preview Mode

When the Preview mode is selected, the following options can be enabled or disabled:

Option Description
Interactive degradation When enabled, this option pauses the calculation when the object is being manipulated in the Ctrl+left mouse button and middle mouse button operating modes.
Restrict to shadow integrity When enabled, this option restricts the calculation of Preview illumination depending upon the selected shadow integrity mode.
Preview color When enabled, the preview takes the light sources' colors into account. When disabled, the preview is shown in grayscale.
Preview bounded attenuation When enabled, the attenuation gizmo indicates the full effect and falloff distances. The surface parts illuminated without light attenuation are displayed in red. The surface parts illuminated with light attenuation are displayed in pink.

The default shadowmap size provided in the application settings is used for the preview mode.

Calculating Lightmaps

When at least one of the visible lighting layers is a lightmap, the lightmap must be calculated before the illumination will be visible.

The lighting resolution and the shadow size are each set by default at 2048 and 1024 pixels, respectively. In the settings, you can increase the lighting or shadow definition for greater fineness when working on an object. Keep in mind, however, that the calculation will be slower as a result of more intensive image information processing.

Select the Lightmap mode. Choose the layers and the surfaces for which lightmaps should be calculated, then use the rendering buttons to render the lightmaps.

Filtering Layers

The Layers filter specifies which layer or layers to take into account when calculating lightmaps.

Filter Description
All Lightmaps will be calculated for all of the layers.
Visible Only the lightmaps for the layers that are visible in the current configuration will be calculated.
Active The lightmap for the active layer will be calculated, even if this lighting is not visible. The active layer is the layer that is currently selected. If multiple layers are selected, the active layer is the layer bordered by a dotted line in the Layers list.

Filtering Surfaces

The Surfaces filter allows you to restrict the surfaces for which lightmaps will be calculated.

Filter Description
All Lightmaps will be rendered for all surfaces.
Selected Select surfaces directly in the 3D product view from the Lighting tab of Shaper. Direct surface selection saves time as it is not necessary to switch to the Surface tab to select a surface requiring a lightmap computation. The selected surfaces for which lightmaps will be calculated will be highlighted in green.
Unlit Lightmaps will be rendered only for surfaces for which no lightmap has been calculated yet.

Setting the Render Quality

A slider allows you to determine the speed at which lightmaps are calculated by setting the balance between speed and precision. The default slider position (50) sets an advantageous rendering speed that preserves global lightmap quality in most contexts.

You can modify this setting by moving the slider towards one of the extremes:

Rendering quality Description
Faster

Rendering speed is increased. The precision of the lightmaps created by this calculation is decreased.

More accurate

Priority is given to the precision of the lightmaps being calculated. This calculation takes longer to carry out.

Launching a Lightmap Render

Two render calculation modes exist:

Mode Description
Start Local Rendering Use this option to calculate lightmaps using your computer's resources.
Start Distributed Rendering Use this option to calculate lightmaps using the resources of a network of computers running Patchwork Lightmap Render. More information on distributed rendering can be found in the chapter Distributed Lightmap Rendering.

The option Show while rendering allows you to visualize the result of the calculation before the calculation has been completed. When this option is enabled, as soon as the lightmap for a surface is calculated, it is shown in the viewport. Surfaces for which the lightmap has not yet been calculated are displayed in red.

If you are calculating lightmaps for multiple layers, the display will switch to the layer for which lighting is being calculated if Show while rendering is checked.

When no lightmap has been calculated for a given surface, it is displayed in red in both Shaper and Matter.

Options for Existing Lightmaps

Surface and layer filters for lightmap calculation are also applied to the following functions.

Once a lightmap has been calculated, you can:

Operation Description
Update Update the lightmap to view the lightmap in a different lightmap format.
Export Export the lightmap as a series of image files.
Remove Remove the lightmap. This deletes the lightmap completely. A deleted lightmap can be recalculated from scratch but cannot be restored.